package com.bwie.controller;

import com.bwie.pojo.TbBrand;
import com.bwie.service.TbBrandService;
import com.bwie.utils.Result;
import com.bwie.vo.PageInfoVo;
import io.swagger.models.auth.In;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * description:
 *
 * @Author zhaohaoyang
 * @Create 2025/5/23 13:49
 * @Version 1.0
 */
@RestController
@RequestMapping("/shop/index")
public class IndexController {
    @Autowired
    TbBrandService tbBrandService;

    /**
     * 品牌添加
     * @param tbBrand
     * @return
     */
    @PostMapping("/addBrand")
    public Result addBrand(@RequestBody TbBrand tbBrand){
        return tbBrandService.addBrand(tbBrand);
    }

    /**
     * 品牌列表
     * @param pageInfoVo
     * @return
     */
    @PostMapping("/getBrandList")
    public Result getBrandList(@RequestBody PageInfoVo pageInfoVo){
        return tbBrandService.getBrandList(pageInfoVo);
    }

    @PostMapping("/changeStatus")
    public Result changeStatus(@RequestBody TbBrand tbBrand){

        return tbBrandService.changeStatus(tbBrand);
    }
}
